home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / UTILSTEM / BAZIC.LZH / BAZIC.DOC < prev    next >
Text File  |  1988-11-18  |  34KB  |  872 lines

  1.                             BAZIC for batch files
  2.  
  3.           version 0.1 (c) copy right 1988 All Rights Reserved
  4.  
  5.  
  6.           You've seen freewares out there which allow you to get the 
  7.           time or date as errorlevels to be checked by the batch 
  8.           commands, right?  But how about some BASIC like functions 
  9.           within your batch files?
  10.  
  11.           What if you can do something like 
  12.  
  13.           ON ERRORLEVEL GOTO address1 address2 address3 address4
  14.  
  15.           or better yet, something like
  16.  
  17.           ON ERRORLEVEL GOSUB address1 address2 address3 address4
  18.  
  19.           and
  20.  
  21.           RETURN (mandatory comment here)
  22.  
  23.           ?
  24.  
  25.  
  26.           What if you want to stop someone from using the computer 
  27.           system while you went to lunch, unless they knew your
  28.           password?  And it goes without saying that you should be 
  29.           able to change your password.
  30.  
  31.  
  32.           What if you can pause and accept keys like this (described 
  33.           in plain English since you'll have to see the function 
  34.           itself to see the logic behind it) ?
  35.  
  36.           "If letter 'a', 'A', 'e' or 'E' then set errorlevel to one 
  37.           to abort and exit the batch command operated menu selection.
  38.  
  39.           If number '1' or letters which look like the number '1', 
  40.           such as the letters 'I' and 'l', then set errorlevel to two 
  41.           and run the 123 program.
  42.  
  43.           If the letter 'd' or 'D' or the number '3' or the symbol 
  44.           '+', then set errorlevel to three to run DBase III plus.
  45.  
  46.           If other keys, ignore them and accept only the above, with 
  47.           option to either display the key typed or not."
  48.  
  49.  
  50.           And obviously, you want to get things like month, day of the 
  51.           month, etc by simply typing something like GET MONTH, right?
  52.  
  53.  
  54.           If you're the skirmish type who've never used batch commands 
  55.           and what's built-in to DOS is more than you'll care to want, 
  56.           then ignore this.
  57.  
  58.           If you're the adventurous type who want batch functions which 
  59.           start looking more and more like a BASIC program, then try 
  60.           BAZIC.EXE here.
  61.  
  62.  
  63.           There is already a sample of what you can do with BAZIC.EXE 
  64.           in the BAZC.BAT batch file.
  65.  
  66.           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  67.  
  68.           If you simply type
  69.  
  70.           BAZIC
  71.  
  72.           then you get the help list only.
  73.  
  74.           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  75.  
  76.           Although this is a program designed to run within a batch 
  77.           file, a small part of this becomes memory resident.
  78.  
  79.           To initialize the features within BAZIC.EXE (normally 
  80.           abbreviated to BAZIC), the first line within the batch file 
  81.           should be
  82.  
  83.           BAZIC RUN
  84.  
  85.           and end it with an <ENTER> or <ntr> or <cr> or anything
  86.           else you want to call the carriage return (the document to 
  87.           follow will always use "<ntr>").
  88.  
  89.           *********************** WARNING *****************************
  90.           *Just the letter 'r' in 'run' will NOT! work:  Unlike other *
  91.           *programs of my group, there is also a BAZIC RETURN, so that*
  92.           *your batch file must have at least BAZIC RU to distinguish *
  93.           *it from BAZIC RE.                                          *
  94.           *************************************************************
  95.  
  96.           As with interpreter BASIC (note the "S"), you can initialize 
  97.           BAZIC using BAZIC RUN within the batch file, or direct mode 
  98.           by typing it in yourself from DOS.  If you try to run BAZIC 
  99.           without having initialized it, BAZIC will tell you that the 
  100.           memory resident part is missing.
  101.  
  102.           Here is the list of functions in this version
  103.  
  104.           BAZIC RUN
  105.           BAZIC ON ERRORLEVEL GOTO/GOSUB
  106.           BAZIC RETURN mandatory comments
  107.           BAZIC INKEY/INKEYOUTKEY
  108.           BAZIC GET
  109.           BAZIC STOP NEWPASSWORD
  110.           BAZIC NEW STACK
  111.  
  112.           The first word after the name of BAZIC.EXE is the function.  
  113.           So "RUN" is a function, "ON" is a function and "RETURN" is a 
  114.           function.  The other words which follow each function name 
  115.           are the parameters for that function.  So "ERRORLEVEL" is a 
  116.           parameter, "GOTO" is a parameter and "GOSUB" is a parameter.
  117.  
  118.           You are allowed to abbreviate most of the function names and 
  119.           the parameters to one or two letters.  The exception is with 
  120.           "INKEYOUTKEY", which can only be shortened to "INKEYO".
  121.  
  122.           The regular and the minimum for abbreviations are mentioned 
  123.           below.  The "ERRORLEVEL" above are shortened to just "ERROR" 
  124.           below.
  125.  
  126.           This program read a batch file called BAZC.BAT by default in 
  127.           the directory where you are now in.
  128.  
  129.           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  130.  
  131.                                BAZIC RUN
  132.  
  133.           The minimum requirement is
  134.  
  135.           BAZIC RU<ntr>
  136.  
  137.           This must be the first function within your batch file.  
  138.           This sets up the memory resident part of BAZIC.EXE (referred 
  139.           to simply as BAZIC) which BAZIC requires in order to operate 
  140.           properly.
  141.  
  142.           The "<ntr>" stands for the carriage return at the end of a 
  143.           line.  You are not to type the letters.  It is used to 
  144.           visually tell you that there is no letter following them.
  145.           There is no need for you to type anything in capital letter, 
  146.           of course.
  147.  
  148.           It's allright if you try to use this function twice since 
  149.           BAZIC will detect the presence of a copy of itself already 
  150.           in memory and will tell you so.
  151.  
  152.           If you did not run this function before some other 
  153.           functions, you'll get an error on screen telling you that 
  154.           the memory resident part is not present.  And in case you 
  155.           tried to mix different incompatible versions of BAZIC.EXE, 
  156.           you'll get a corresponding message telling you of the 
  157.           conflict as well.
  158.  
  159.           Often, if BAZIC's function detects an error in the batch 
  160.           file, it places the string
  161.  
  162.           GOTO ERROR<ntr>
  163.  
  164.           in the batch file itself.
  165.  
  166.           As long as there is no label ":ERROR" within your batch 
  167.           file, this will cause your batch file to stop executing.
  168.  
  169.           Make sure that you leave at least one blank line after each 
  170.           and every functions.  Otherwise, if an error condition
  171.           occurs, the next line will be overwritten by the words
  172.           "GOTO ERROR".
  173.  
  174.           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  175.  
  176.                              ON ERRORLEVEL GOTO
  177.                              ON ERRORLEVEL GOSUB
  178.                              RETURN mandatory comment
  179.  
  180.           The minimum requirement at the moment are
  181.  
  182.           BAZIC O ER GOT ...
  183.           BAZIC O ER GOS ...
  184.           BAZIC RE .                 <=each RETURN must have different 
  185.                                        and unique comment,  even if just 
  186.                                        one letter each.
  187.  
  188.           example 1:
  189.  
  190.           BAZIC ON ERROR GOTO DO0 DO1 DO2 DO3 DO4 DO5 DO6 DO7 DO8<ntr>
  191.           <ntr>
  192.           <ntr>
  193.           :DO0<ntr>
  194.           ...
  195.           :DO1<ntr>
  196.           ...
  197.           etc
  198.  
  199.           If ERRORLEVEL = 2, then the batch file wording will be 
  200.           changed to the following
  201.  
  202.           BAZIC ON ERROR GOTO DO0 DO1 DO2 DO3 DO4 DO5 DO6 DO7 DO8<ntr>
  203.           GOTO DO2<ntr>
  204.           <ntr>
  205.           :DO0<ntr>
  206.           ...
  207.           :DO1<ntr>
  208.           ...
  209.           etc
  210.  
  211.           There is no variable support for this version so that only 
  212.           the word "ERROR" is acceptable after the "ON" command.
  213.  
  214.           If the word "GOTO" is found (as opposed to the word
  215.           "GOSUB"), then the errorlevel is read into BAZIC and
  216.           depending on whether the errorlevel is 0 through 8, the
  217.           <ntr> on the next line is replaced by the word:
  218.  
  219.           GOTO DO0<ntr>
  220.           through      
  221.           GOTO DO8<ntr>
  222.  
  223.           If the errorlevel is greater than the number of parameters 
  224.           in the listing, then the <ntr> on the next line is replaced 
  225.           by the word:
  226.           GOTO ERROR<ntr>
  227.  
  228.           Unless your program has a label called ":ERROR", this will 
  229.           cause your batch program to stop and the batch file will 
  230.           contain this word (GOTO ERROR<ntr>) to tell you which line 
  231.           caused it.
  232.  
  233.           Each adddresses, as well as each parameter must be separated 
  234.           by at least one space or tab.
  235.  
  236.           So, this is not correct.
  237.  
  238.           BAZIC ON ERRORLEVELGOSUBDOTHISANDTHAT
  239.  
  240.           The addresses must not be one letter parameters or a letter 
  241.           followed by a non-alphabet symbol.
  242.           (if people liked this enough to ask for the next version, 
  243.           BAZIC may mistake it for a variable parameter.)
  244.  
  245.           example 2:
  246.  
  247.           BAZIC ON ERROR GOSUB DO0 DO1 DO2 DO3<ntr>
  248.           <ntr>
  249.           <ntr>
  250.  
  251.           The ON ... GOSUB must be followed by at least two blank 
  252.           lines after it.  All other functions must have at least one 
  253.           blank line after it.
  254.  
  255.           As above, a "GOTO DO0" through "GOTO DO3" is generated for 
  256.           the next line.  However, the line is replaced by two lines 
  257.           composed of an example such as
  258.  
  259.           BAZIC ON ERROR GOSUB DO0 DO1 DO2 DO3<ntr>
  260.           GOTO DO1<ntr>
  261.           :ZZZ100<ntr>
  262.  
  263.           If you had any comment or commands on the two lines 
  264.           following the BAZIC ON ERROR GOSUB ..., then those lines are 
  265.           erased.
  266.  
  267.           The number following the ":ZZZ" part is the line number 
  268.           of the corresponding BAZIC ON ... here and is stored in the 
  269.           internal stack.  A BAZIC RETURN generates a GOTO based on 
  270.           the last line number stored in the internal stack.  This 
  271.           also means that if your application program changes the
  272.           number of lines of text in your batch file, BAZIC will get
  273.           confused and generate incorrect codes.
  274.  
  275.                              BAZIC RETURN comment
  276.  
  277.           The minimum requirement at the moment is
  278.  
  279.           BAZIC RE mandatory distinctly different comments
  280.  
  281.           If BAZIC runs with the parameter "RETURN" as in 
  282.  
  283.           REM anything you like
  284.           BAZIC RETURN individualistic comment needed here<ntr>
  285.           <ntr>
  286.  
  287.           then the single <ntr> after this is replaced by "GOTO ZZZ100" 
  288.           as in
  289.  
  290.           REM anything you like
  291.           BAZIC RETURN a distinct comment is needed<ntr>
  292.           GOTO ZZZ100<ntr>
  293.  
  294.           If either the GOSUB address is outside the list of 
  295.           parameters given, or if the internal stack overflowed, then 
  296.           the line will be replaced by 
  297.  
  298.           REM errorlevel is set to 4 or above here
  299.           BAZIC ON ERROR GOSUB DO0 DO1 DO2 DO3<ntr>
  300.           GOTO ERROR<ntr>
  301.  
  302.           Because BAZIC is not in control all the time, BAZIC does not 
  303.           really know which BAZIC RETURN in a batch file really called 
  304.           itself.  To help in this, each BAZIC RETURN must be followed 
  305.           by a comment which is different from any other in the batch 
  306.           file:  The comments may vary by just one letter, an extra 
  307.           space or anything trivial like a capital letter instead of a 
  308.           small letter for one word, or long and descriptive.
  309.  
  310.           This is not likely to be a problem with other functions 
  311.           since if any two are used identically, then they can be made 
  312.           into a subroutine.
  313.  
  314.           If no GOSUB called this (in other words, you tried to 
  315.           RETURN without a corresponding GOSUB), then the batch file 
  316.           is modified to this form to stop the batch command.
  317.  
  318.           REM anything you like
  319.           BAZIC RETURN 11anycomment at all<ntr>
  320.           GOTO ERROR<ntr>
  321.  
  322.           example 3:
  323.  
  324.           BAZIC RUN<ntr>
  325.           goto one<ntr>
  326.           :zero<ntr>
  327.           BAZIC RETURN a<ntr>
  328.           <ntr>
  329.           :one<ntr>
  330.           BAZIC ON ERROR GOSUB zero one two<ntr>
  331.           GOTO zero<ntr>
  332.           <ntr>
  333.           <ntr>
  334.  
  335.           Once this batch file runs, it generates the following batch 
  336.           file
  337.  
  338.           BAZIC RUN<ntr>
  339.           goto one<ntr>
  340.           :zero<ntr>
  341.           BAZIC RETURN a<ntr>
  342.           GOTO :ZZZ7<ntr>
  343.           :one<ntr>
  344.           BAZIC ON ERROR GOSUB zero one two<ntr>
  345.           GOTO zero<ntr>
  346.           :ZZZ7<ntr>
  347.  
  348.           that is assuming that the batch file is allowed to run 
  349.           without your aborting with control-break.
  350.  
  351.           Of course, when you type one yourself, you do not have to 
  352.           use capital letters.  The BAZIC.EXE name and the functions 
  353.           are in capital letters to highlight the fact that they are 
  354.           reserved words and the words you would have choices are in 
  355.           small letters to denote it.
  356.  
  357.           However, all the codes which BAZIC.EXE itself generates are 
  358.           always in capital letters, in order to facilitate debugging 
  359.           your batch file.
  360.  
  361.           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  362.  
  363.                                       INKEY
  364.  
  365.           BAZIC INKEY
  366.           BAZIC INKEY abc d e
  367.           BAZIC INKEYOUTKEY abcABC dD eE
  368.  
  369.           The minimum requirement at the moment is
  370.  
  371.           BAZIC I<ntr>
  372.           BAZIC INKEYO<ntr>
  373.  
  374.           example 1:
  375.  
  376.           BAZIC INKEY<ntr>
  377.  
  378.           This BAZIC will pause for any ascii typed at the keyboard.  
  379.           The program will not accept function keys or cursor keys 
  380.           which do not generate an ascii code, but will accept the 
  381.           alter key and the numeric key pad combination to generate 
  382.           chr$(128) through chr$(255).
  383.  
  384.           When the program exits, the errorlevel is set to the 
  385.           corresponding ascii value of the key typed.  For example, if 
  386.           you had pressed down on the space bar, errorlevel will be 
  387.           set to 32.  <ntr> will set the errorlevel to 13.  Therefore, 
  388.           the errorlevel will always be set to between 1 and 255.
  389.  
  390.           The exception is if you type <esc>; in this case, the 
  391.           errorlevel is not set to 27 as expected, but is set to zero.
  392.  
  393.           This is a special case since <esc> is generally accepted as 
  394.           the abort key in most PC programs.  This allows your batch 
  395.           program to check to see if the user wanted to abort at this 
  396.           point, rather than simply pause here.
  397.  
  398.           But then, what good is typing a letter if you cannot do 
  399.           anything of much with the letter you typed?  In that case, 
  400.           the next method will allow you finer control.
  401.  
  402.           Unlike regular BASIC's (note that "S" in BASIC) INKEY$ 
  403.           function, where you must do something like
  404.  
  405.           10 a$=inkey$:if a$="" then goto 10
  406.  
  407.           there is no need to loop back in case there is no key.  
  408.           BAZIC's INKEY will wait until you do type a key.
  409.  
  410.           Also note that within the batch file, if you set echo off, 
  411.           then the BAZIC INKEY function itself will not display on 
  412.           screen.  However, the BAZIC INKEY function will still be 
  413.           expecting a key to be typed by you.
  414.  
  415.           example 2:
  416.  
  417.           BAZIC INKEY abcABC Dd eEfG<ntr>
  418.  
  419.           If you typed any of the letters in the first parameter 
  420.           (abcABC), then the errorlevel is set to one on exit.  If 
  421.           you typed either the "D" or the "d", then the errorlevel is 
  422.           set to two, and if you type any of the letters in the third 
  423.           parameter (eEfG), then the errorlevel is set to three.
  424.  
  425.           As with the first example, if you typed <esc>, then the 
  426.           errorlevel is set to zero.  Typing anything else will not 
  427.           do anything.
  428.  
  429.           Note that this does not allow cursor keys, function keys or 
  430.           alt key combinations which do not generate any ascii 
  431.           character either.
  432.  
  433.           Also note that the INKEY is case sensitive.  In other words, 
  434.           the program distinguishes between capital letters and small 
  435.           letters such that if the example had the parameters
  436.  
  437.           BAZIC INKEY a B C dA<ntr>
  438.  
  439.           then typing "a" sets errorlevel to one, "B" sets errorlevel 
  440.           to two, "C" sets errorlevel to three and either "d" or "A" 
  441.           will set errorlevel to four.  BAZIC will just wait until 
  442.           you type one of these five (or <esc>) keys.
  443.  
  444.           You can couple such a command with REMinders such as
  445.  
  446.           REM type "a" to get address book,   "d" to find date
  447.           REM      "A" to Automate everything <esc> to prematurely end
  448.           BAZIC INKEY a d A
  449.           BAZIC ON ERROR GOTO abort address date automate
  450.  
  451.           example 3:
  452.  
  453.           BAZIC INKEYOUTKEY a b c<ntr>
  454.  
  455.           This behaves just like the regular INKEY, but the key which 
  456.           you do type is reflected back to the screen and is 
  457.           displayed to confirm the key you typed.
  458.  
  459.           The key you type is displayed at the cursor location (and 
  460.           appropriate page location on color graphic adaptor and 
  461.           enhanced graphic adaptor "CGA and EGA").
  462.  
  463.           This example will display any character you type, but will 
  464.           not exit until you type the small letters "a", "b" or "c".
  465.  
  466.           Once you type one of the letters, then errorlevel is set to 
  467.           one, two or three respectively.  As with previous examples, 
  468.           if you type <esc>, then errorlevel is set to zero. (and a 
  469.           left pointing arrow representing the escape code is 
  470.           displayed on screen as well.)
  471.  
  472.           Note that as with the previous examples, this is also case 
  473.           sensitive, so if you want either the capital or the small 
  474.           letters to respond the same, you must have
  475.  
  476.           BAZIC INKEYOUTKEY aA bB cC<ntr>
  477.  
  478.           And if you want a user forgiving format which allows 
  479.           accidental use of a number which looks like a letter to be 
  480.           accepted as a letter, you can try
  481.  
  482.           BAZIC INKEYOUTKEY oO0 iIlL1<ntr>
  483.  
  484.           In this case, the letter "o" or "O" or the number "0" will 
  485.           set errorlevel to one, while the letter "i" or "I" or "l" or 
  486.           "L" or the number "1" will set errorlevel to two.
  487.  
  488.           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  489.  
  490.                            BAZIC GET date/time
  491.  
  492.           The minimum requirements at the moment is
  493.  
  494.           BAZIC G MO       to GET MONTH
  495.           BAZIC G D        to GET DAY of the month
  496.           BAZIC G H        to get HOUR
  497.           BAZIC G MI       to get MINUTE
  498.  
  499.           If it is February 14 at 1:30 PM (in other words 13:30), then 
  500.  
  501.           BAZIC GET MONTH
  502.  
  503.           will set errorlevel to 2.
  504.           Errorlevel will be between 1 and 13.
  505.  
  506.           BAZIC GET DAY-OF-THE-MONTH
  507.  
  508.           will set errorlevel to 14.
  509.           Errorlevel will be between 1 and 31.
  510.  
  511.           BAZIC GET HOUR
  512.  
  513.           will set errorlevel to 13.
  514.           Errorlevel will be between 0 and 23.
  515.  
  516.           BAZIC GET MINUTE
  517.  
  518.           will set errorlevel to 30.
  519.           Errorlevel will be between 0 and 59.
  520.  
  521.           Note:  The ON ERRORLEVEL GOSUB/GOTO is designed so that it 
  522.           can easily handle over a hundred parameters if need be, so 
  523.           handling only 60 for each minute of the hour is not a BAZIC 
  524.           limitation.  However, the line command where the addresses 
  525.           of the ON ... function is on is limited to 128 bytes.  Of 
  526.           course, if I can afford to buy DOS 4.0, maybe the limit is 
  527.           gone.  And again, maybe not.
  528.  
  529.           The above parameters will generate the proper values for DOS 
  530.           3.3 and below.  It is assumed that noone is still using DOS 
  531.           1.0 or 1.1 with their computer.
  532.  
  533.           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  534.  
  535.                                 BAZIC STOP
  536.                             BAZIC STOP NEWPASS
  537.  
  538.           The minimum requirement at the moment is
  539.  
  540.           BAZIC S          to stop access on the computer system.
  541.           BAZIC S N        to assign a new password
  542.  
  543.           In the first mode, BAZIC is waiting for you to type the
  544.           internal password before BAZIC will exit, allowing you to
  545.           access DOS again.  This locks the user from using the 
  546.           computer:  Until you type the correct password, you cannot 
  547.           get out (except by rebooting).
  548.  
  549.           In the second mode, BAZIC allows any character or string as 
  550.           "N" at the moment, since there are no other parameter 
  551.           options for the STOP function anyway.  In this mode, BAZIC
  552.           will prompt you to enter the old password.  If the old
  553.           password matches, then BAZIC will prompt you to enter the
  554.           new password.  This does not lock the user from using the
  555.           computer.
  556.  
  557.           In the beginning, the default password is just the carriage 
  558.           return.
  559.  
  560.           Up to 20 characters can by typed, ending with the gray 
  561.           carriage return key.  If you type control-M or "13" using 
  562.           the alt key and the numeric key pad, they are stored as part 
  563.           of the password.  Only the gray carriage return key can 
  564.           terminate the password.
  565.  
  566.           Unlike other passwords, this allows combinations of cursor 
  567.           keys, function keys, alt key combinations and any other 
  568.           typeable key combinations as distinctly different key 
  569.           combinations.  Obviously, capital letters and small letters 
  570.           are distinct and different from each other.
  571.  
  572.           As with interpreter BASIC (note the "S"), this function can 
  573.           run by itself without being in the batch file, since it 
  574.           makes sense to use this function from within a batch file or 
  575.           directly from the DOS prompt B>, C> etc.
  576.  
  577.           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  578.  
  579.                               BAZIC NEW STACK
  580.  
  581.           The minimum allowed at the moment is
  582.  
  583.           BAZIC N
  584.  
  585.           This removes all the stack values stored from the 
  586.           ON ERROR GOSUB ...
  587.  
  588.           At the moment, the only parameter allowed for the NEW 
  589.           function is to set a new stack so you do not have to type 
  590.           BAZIC NEW STACK or BAZIC N S.
  591.  
  592.           This does not write the batch file since this will usually 
  593.           be used from direct mode, as opposed to within a batch file.
  594.  
  595.  
  596.           While you're debugging your batch file, you may go over the 
  597.           250 entries limit of the internal stack for the GOSUB.  
  598.           That's the only reason to use this function.  At the moment.
  599.  
  600.           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  601.  
  602.                              MESSAGES FROM BAZIC
  603.  
  604.           =-=-=
  605.           Unknown and is not in batch command file
  606.           =-=-=
  607.  
  608.           This is unknown and you used the direct mode, 
  609.           instead of trying to use it within the batch file.
  610.  
  611.           BAZIC opened the default batch file BAZC.BAT and searched 
  612.           inside here to see where the function call came from. 
  613.           BAZIC couldn't find the line in the batch file in order to
  614.           insert the error line (GOTO ERROR).
  615.  
  616.           =-=-=
  617.           Each RETURN needs a distinct comment to go with it
  618.           =-=-=
  619.  
  620.           You had a BAZIC RETURN without the mandatory comment to go 
  621.           with it.  Because you may run programs, do batch commands or 
  622.           do anything possible from DOS, BAZIC needs each function to 
  623.           be distinct from each other.  The difference may be just an 
  624.           extra space or a tab but is essential for BAZIC to tell 
  625.           itself where it is and where it is going inside the batch 
  626.           file.
  627.  
  628.           =-=-=
  629.           RETURN encountered without a corresponding ON ... GOSUB
  630.           =-=-=
  631.  
  632.           There was no BAZIC ON ERRORLEVEL GOSUB ... which has ran 
  633.           yet, but a BAZIC RETURN (comments) was encountered inside 
  634.           the batch file.  The operation is just like in regular 
  635.           interpreter BASIC.
  636.  
  637.           =-=-=
  638.           The internal stack for ON .. GOSUB overflowed
  639.           =-=-=
  640.  
  641.           The ON ... GOSUB can be nested up to 250 levels and should 
  642.           not normally cause this error, except while debugging your 
  643.           batch files.
  644.  
  645.           If you want to eliminate the internal stack, try running the 
  646.           NEW function as in BAZIC NEW STACK.
  647.  
  648.           =-=-=
  649.           Memory resident part of BAZIC is not present
  650.           =-=-=
  651.  
  652.           BAZIC needs the memory resident part of itself in memory, 
  653.           initialized using BAZIC RUN.
  654.  
  655.           =-=-=
  656.           The memory resident part of BAZIC is the wrong version
  657.           to work with this BAZIC.  I am aborting.
  658.           =-=-=
  659.  
  660.           You mixed the wrong versions of BAZIC.  It's best that you 
  661.           control-break and reboot.  This BAZIC has no ability to wipe 
  662.           itself from memory.
  663.  
  664.  
  665.           =-=-=
  666.           Batch file read and changed but I cannot write the file
  667.           =-=-=
  668.  
  669.           The batch file BAZC.BAT was found but was not set to allow 
  670.           writing the file.  Since BAZIC constantly changes the actual 
  671.           text content of the batch file itself, this will not work.
  672.  
  673.           =-=-=
  674.           Unknown parameter found
  675.           =-=-=
  676.  
  677.           Something unknown was typed in.  Check the batch file and 
  678.           look for the line with the word "GOTO ERROR".  You typed 
  679.           something BAZIC did not understand on the line previous to 
  680.           this one.
  681.  
  682.           If your word processor or editor was activated by the very 
  683.           same BAZC.BAT file, then it can be used to change BAZC.BAT, 
  684.           or at least used to look at how the batch file is constantly 
  685.           being changed.  It's a good and simple way of debugging your 
  686.           batch file.
  687.  
  688.           =-=-=
  689.           You don't have to do it, BAZIC is already in memory
  690.           =-=-=
  691.  
  692.           You did BAZIC RUN twice.  No harm done and no extra memory 
  693.           is used by doing this as many times as you like.
  694.  
  695.  
  696.           =-=-=
  697.           The file length is more than 5000 bytes
  698.       If I try to change this, there is going to be trouble.
  699.           =-=-=
  700.  
  701.           The batch file is longer than 5000 bytes.  This can no 
  702.           longer be read.  This version is designed to work with a 
  703.           batch file whose maximum size is 5000 bytes.
  704.  
  705.           =-=-=
  706.           Enter the old password and end with <ntr>
  707.           =-=-=
  708.  
  709.           BAZIC STOP NEWPASS was used to enter a new password to stop 
  710.           your system.  To make sure that you are the person who is 
  711.           allowed to change the old password, you must type the old 
  712.           password as it exists in BAZIC right now.  You must end this 
  713.           with the gray carriage return key below the back space key.  
  714.  
  715.           The default password is just the carriage return.
  716.  
  717.           If you enter carriage return as control-M or by pressing 
  718.           down on the alter key and typing out "13" on the numeric key 
  719.           pad, they are accepted as part of the password.
  720.  
  721.           =-=-=
  722.           Now the new password and end with <ntr>
  723.           =-=-=
  724.  
  725.           BAZIC STOP NEWPASS accepted the old password as correct.  
  726.           Now enter the new password, ending with the carriage return.
  727.           Up to 20 characters may be used.
  728.  
  729.           You can use a conventional password composed of letters, or 
  730.           a non-conventional one composed of control-cursor keys, 
  731.           letters and numbers, shift-function keys, etc etc etc.
  732.  
  733.           =-=-=
  734.           This does not match my pass
  735.           =-=-=
  736.  
  737.           BAZIC STOP NEWPASS function tried to match your password 
  738.           with the one stored internally and found that it does not 
  739.           match.
  740.  
  741.           You are not allowed to change the password unless you can 
  742.           match the one already in memory.
  743.  
  744.           =-=-=
  745.           The file length is zero
  746.           =-=-=
  747.  
  748.           The batch file was found but was found to be of length null.  
  749.           In other words, it's empty.
  750.  
  751.           =-=-=
  752.           I cannot find the file.
  753.           =-=-=
  754.  
  755.           The batch file was not found.
  756.  
  757.           =-=-=
  758.           The file exists but I cannot read it.
  759.           =-=-=
  760.  
  761.           The batch file was found but was unable to read it.
  762.  
  763.  
  764.  
  765.                                CHIT-CHATS
  766.  
  767.           For speed of execution, size of program for what it does, 
  768.           and the little space it takes on a disk, nothing beats 
  769.           pure assembler, as are all other programs from my group.  
  770.           But ohhhhhhhh the pain and time.  Merry Xmas and a happy new 
  771.           year.
  772.  
  773.           =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  774.  
  775.  
  776.           All products and names mentioned are Trademarks or
  777.           Registered Trademarks of their respective corporations or
  778.           companies.
  779.  
  780.           All enclosed programs, documents and other files are
  781.           provided AS IS, without any warranty, expressed or implied,
  782.           including but not limited to fitness for a particular
  783.           purpose.
  784.  
  785.           A contribution of $10 US/Canadian is appreciated if you
  786.           find this useful, or $20 for an improved one.  Your
  787.           negative criticisms are as welcome as your positive ones.
  788.           Suggest any function you would like to see.
  789.  
  790.           NAME OF THE PROGRAM:              BAZIC.EXE
  791.  
  792.           PURPOSE OF THIS PROGRAM:
  793.  
  794.           This partly memory resident program is designed to provide 
  795.           extra BASIC like functions for the batch file commands, such 
  796.           as ON ERRORLEVEL GOSUB/GOTO address1 address2 address3.  As 
  797.           with the batch file itself, this works best if ran it off a 
  798.           virtual (RAM) disk.
  799.  
  800.           Most tests have been performed on DOS 3.3 or prior.  How it 
  801.           will behave on DOS 4.0 is not known.
  802.  
  803.  
  804.           my old forwarding address was
  805.  
  806.           Dr. Masaaki Sawada & Assoc.
  807.           University of Waterloo, Faculty of Science
  808.           Waterloo, Ontario  Canada  N2L 3G1
  809.  
  810.  
  811.           the new forwarding address is
  812.  
  813.  
  814.           Dr. Masaaki Sawada & Assoc.
  815.           Lady Davis Institute for Medical Research,
  816.           Sir M. B. Davis Jewish General Hospital,
  817.           3755 Chemin Cote Ste-Catherine, 
  818.           Montreal, Quebec, 
  819.           Canada  H3T 1E2
  820.  
  821.  
  822.           (you'll find it a lot easier to cut this address out with
  823.           your word processor and print it on an envelope, rather
  824.           than trying to write it by hand)
  825.  
  826.  
  827.                The institute name is given instead of home address to
  828.           lower the chances that any mail is delivered to a wrong
  829.           address (a common occurrence).  However no institute time
  830.           nor equipment was used to write this program or document.
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.          ----------------end-of-author's-documentation---------------
  839.  
  840.                         Software Library Information:
  841.  
  842.                    This disk copy provided as a service of
  843.  
  844.                         The Public (Software) Library
  845.  
  846.          We are not the authors of this program, nor are we associated
  847.          with the author in any way other than as a distributor of the
  848.          program in accordance with the author's terms of distribution.
  849.  
  850.          Please direct shareware payments and specific questions about
  851.          this program to the author of the program, whose name appears
  852.          elsewhere in  this documentation. If you have trouble getting
  853.          in touch with the author,  we will do whatever we can to help
  854.          you with your questions. All programs have been tested and do
  855.          run.  To report problems,  please use the form that is in the
  856.          file PROBLEM.DOC on many of our disks or in other written for-
  857.          mat with screen printouts, if possible.  The P(s)L cannot de-
  858.          bug programs over the telephone.
  859.  
  860.          Disks in the P(s)L are updated monthly, so if you did not get
  861.          this disk  directly from the P(s)L,  you should be aware that
  862.          the files in this set may no  longer be the current versions.
  863.  
  864.          For a copy of the latest monthly software library newsletter
  865.          and a list of the 1,400+ disks in the library, call or write
  866.  
  867.                         The Public (Software) Library
  868.                               P.O.Box 35705 - F
  869.                            Houston, TX 77235-5705
  870.                                (713) 665-7017
  871.  
  872.